/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.mcet;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 *
 * @author dell
 */
@Entity
@Table(name = "medical", catalog = "outliers", schema = "")
@NamedQueries({
    @NamedQuery(name = "Medical.findAll", query = "SELECT m FROM Medical m"),
    @NamedQuery(name = "Medical.findByEntityID", query = "SELECT m FROM Medical m WHERE m.entityID = :entityID"),
    @NamedQuery(name = "Medical.findByPrimOrder", query = "SELECT m FROM Medical m WHERE m.primOrder = :primOrder"),
    @NamedQuery(name = "Medical.findByPrimaryGroup", query = "SELECT m FROM Medical m WHERE m.primaryGroup = :primaryGroup"),
    @NamedQuery(name = "Medical.findBySecOrder", query = "SELECT m FROM Medical m WHERE m.secOrder = :secOrder"),
    @NamedQuery(name = "Medical.findBySecondaryGroup", query = "SELECT m FROM Medical m WHERE m.secondaryGroup = :secondaryGroup"),
    @NamedQuery(name = "Medical.findByTerNo", query = "SELECT m FROM Medical m WHERE m.terNo = :terNo"),
    @NamedQuery(name = "Medical.findByDiagnosis", query = "SELECT m FROM Medical m WHERE m.diagnosis = :diagnosis"),
    @NamedQuery(name = "Medical.findBySearchTerms", query = "SELECT m FROM Medical m WHERE m.searchTerms = :searchTerms"),
    @NamedQuery(name = "Medical.findByFulldiagnosis", query = "SELECT m FROM Medical m WHERE m.fulldiagnosis = :fulldiagnosis"),
    @NamedQuery(name = "Medical.findBySNOMEDCode", query = "SELECT m FROM Medical m WHERE m.sNOMEDCode = :sNOMEDCode"),
    @NamedQuery(name = "Medical.findByFsn", query = "SELECT m FROM Medical m WHERE m.fsn = :fsn"),
    @NamedQuery(name = "Medical.findByICD10code", query = "SELECT m FROM Medical m WHERE m.iCD10code = :iCD10code"),
    @NamedQuery(name = "Medical.findByICDSupplementaryCharacter", query = "SELECT m FROM Medical m WHERE m.iCDSupplementaryCharacter = :iCDSupplementaryCharacter"),
    @NamedQuery(name = "Medical.findByICD10Decription", query = "SELECT m FROM Medical m WHERE m.iCD10Decription = :iCD10Decription"),
    @NamedQuery(name = "Medical.findByTraumaFlag", query = "SELECT m FROM Medical m WHERE m.traumaFlag = :traumaFlag"),
    @NamedQuery(name = "Medical.findByCDScode", query = "SELECT m FROM Medical m WHERE m.cDScode = :cDScode"),
    @NamedQuery(name = "Medical.findByCDSsub1", query = "SELECT m FROM Medical m WHERE m.cDSsub1 = :cDSsub1"),
    @NamedQuery(name = "Medical.findByCDSsub2", query = "SELECT m FROM Medical m WHERE m.cDSsub2 = :cDSsub2"),
    @NamedQuery(name = "Medical.findByCDSsub3", query = "SELECT m FROM Medical m WHERE m.cDSsub3 = :cDSsub3"),
    @NamedQuery(name = "Medical.findByCDSsub4", query = "SELECT m FROM Medical m WHERE m.cDSsub4 = :cDSsub4"),
    @NamedQuery(name = "Medical.findByCDSarea", query = "SELECT m FROM Medical m WHERE m.cDSarea = :cDSarea"),
    @NamedQuery(name = "Medical.findByCDSSide", query = "SELECT m FROM Medical m WHERE m.cDSSide = :cDSSide"),
    @NamedQuery(name = "Medical.findByIssue", query = "SELECT m FROM Medical m WHERE m.issue = :issue"),
    @NamedQuery(name = "Medical.findByNotes", query = "SELECT m FROM Medical m WHERE m.notes = :notes")})
public class Medical implements Serializable {
    @Transient
    private PropertyChangeSupport changeSupport = new PropertyChangeSupport(this);
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "EntityID")
    private String entityID;
    @Column(name = "PrimOrder")
    private String primOrder;
    @Column(name = "Primary_Group")
    private String primaryGroup;
    @Column(name = "SecOrder")
    private String secOrder;
    @Column(name = "Secondary_Group")
    private String secondaryGroup;
    @Column(name = "TerNo")
    private String terNo;
    @Column(name = "Diagnosis")
    private String diagnosis;
    @Column(name = "Search_Terms")
    private String searchTerms;
    @Column(name = "Full_diagnosis")
    private String fulldiagnosis;
    @Column(name = "SNOMED_Code")
    private String sNOMEDCode;
    @Column(name = "FSN")
    private String fsn;
    @Column(name = "ICD10_code")
    private String iCD10code;
    @Column(name = "ICDSupplementaryCharacter")
    private String iCDSupplementaryCharacter;
    @Column(name = "ICD10Decription")
    private String iCD10Decription;
    @Column(name = "TraumaFlag")
    private String traumaFlag;
    @Column(name = "CDS_code")
    private String cDScode;
    @Column(name = "CDS_sub1")
    private String cDSsub1;
    @Column(name = "CDS_sub2")
    private String cDSsub2;
    @Column(name = "CDS_sub3")
    private String cDSsub3;
    @Column(name = "CDS_sub4")
    private String cDSsub4;
    @Column(name = "CDS_area")
    private String cDSarea;
    @Column(name = "CDS_Side")
    private String cDSSide;
    @Column(name = "Issue")
    private String issue;
    @Column(name = "Notes")
    private String notes;

    public Medical() {
    }

    public Medical(String entityID) {
        this.entityID = entityID;
    }

    public String getEntityID() {
        return entityID;
    }

    public void setEntityID(String entityID) {
        String oldEntityID = this.entityID;
        this.entityID = entityID;
        changeSupport.firePropertyChange("entityID", oldEntityID, entityID);
    }

    public String getPrimOrder() {
        return primOrder;
    }

    public void setPrimOrder(String primOrder) {
        String oldPrimOrder = this.primOrder;
        this.primOrder = primOrder;
        changeSupport.firePropertyChange("primOrder", oldPrimOrder, primOrder);
    }

    public String getPrimaryGroup() {
        return primaryGroup;
    }

    public void setPrimaryGroup(String primaryGroup) {
        String oldPrimaryGroup = this.primaryGroup;
        this.primaryGroup = primaryGroup;
        changeSupport.firePropertyChange("primaryGroup", oldPrimaryGroup, primaryGroup);
    }

    public String getSecOrder() {
        return secOrder;
    }

    public void setSecOrder(String secOrder) {
        String oldSecOrder = this.secOrder;
        this.secOrder = secOrder;
        changeSupport.firePropertyChange("secOrder", oldSecOrder, secOrder);
    }

    public String getSecondaryGroup() {
        return secondaryGroup;
    }

    public void setSecondaryGroup(String secondaryGroup) {
        String oldSecondaryGroup = this.secondaryGroup;
        this.secondaryGroup = secondaryGroup;
        changeSupport.firePropertyChange("secondaryGroup", oldSecondaryGroup, secondaryGroup);
    }

    public String getTerNo() {
        return terNo;
    }

    public void setTerNo(String terNo) {
        String oldTerNo = this.terNo;
        this.terNo = terNo;
        changeSupport.firePropertyChange("terNo", oldTerNo, terNo);
    }

    public String getDiagnosis() {
        return diagnosis;
    }

    public void setDiagnosis(String diagnosis) {
        String oldDiagnosis = this.diagnosis;
        this.diagnosis = diagnosis;
        changeSupport.firePropertyChange("diagnosis", oldDiagnosis, diagnosis);
    }

    public String getSearchTerms() {
        return searchTerms;
    }

    public void setSearchTerms(String searchTerms) {
        String oldSearchTerms = this.searchTerms;
        this.searchTerms = searchTerms;
        changeSupport.firePropertyChange("searchTerms", oldSearchTerms, searchTerms);
    }

    public String getFulldiagnosis() {
        return fulldiagnosis;
    }

    public void setFulldiagnosis(String fulldiagnosis) {
        String oldFulldiagnosis = this.fulldiagnosis;
        this.fulldiagnosis = fulldiagnosis;
        changeSupport.firePropertyChange("fulldiagnosis", oldFulldiagnosis, fulldiagnosis);
    }

    public String getSNOMEDCode() {
        return sNOMEDCode;
    }

    public void setSNOMEDCode(String sNOMEDCode) {
        String oldSNOMEDCode = this.sNOMEDCode;
        this.sNOMEDCode = sNOMEDCode;
        changeSupport.firePropertyChange("SNOMEDCode", oldSNOMEDCode, sNOMEDCode);
    }

    public String getFsn() {
        return fsn;
    }

    public void setFsn(String fsn) {
        String oldFsn = this.fsn;
        this.fsn = fsn;
        changeSupport.firePropertyChange("fsn", oldFsn, fsn);
    }

    public String getICD10code() {
        return iCD10code;
    }

    public void setICD10code(String iCD10code) {
        String oldICD10code = this.iCD10code;
        this.iCD10code = iCD10code;
        changeSupport.firePropertyChange("ICD10code", oldICD10code, iCD10code);
    }

    public String getICDSupplementaryCharacter() {
        return iCDSupplementaryCharacter;
    }

    public void setICDSupplementaryCharacter(String iCDSupplementaryCharacter) {
        String oldICDSupplementaryCharacter = this.iCDSupplementaryCharacter;
        this.iCDSupplementaryCharacter = iCDSupplementaryCharacter;
        changeSupport.firePropertyChange("ICDSupplementaryCharacter", oldICDSupplementaryCharacter, iCDSupplementaryCharacter);
    }

    public String getICD10Decription() {
        return iCD10Decription;
    }

    public void setICD10Decription(String iCD10Decription) {
        String oldICD10Decription = this.iCD10Decription;
        this.iCD10Decription = iCD10Decription;
        changeSupport.firePropertyChange("ICD10Decription", oldICD10Decription, iCD10Decription);
    }

    public String getTraumaFlag() {
        return traumaFlag;
    }

    public void setTraumaFlag(String traumaFlag) {
        String oldTraumaFlag = this.traumaFlag;
        this.traumaFlag = traumaFlag;
        changeSupport.firePropertyChange("traumaFlag", oldTraumaFlag, traumaFlag);
    }

    public String getCDScode() {
        return cDScode;
    }

    public void setCDScode(String cDScode) {
        String oldCDScode = this.cDScode;
        this.cDScode = cDScode;
        changeSupport.firePropertyChange("CDScode", oldCDScode, cDScode);
    }

    public String getCDSsub1() {
        return cDSsub1;
    }

    public void setCDSsub1(String cDSsub1) {
        String oldCDSsub1 = this.cDSsub1;
        this.cDSsub1 = cDSsub1;
        changeSupport.firePropertyChange("CDSsub1", oldCDSsub1, cDSsub1);
    }

    public String getCDSsub2() {
        return cDSsub2;
    }

    public void setCDSsub2(String cDSsub2) {
        String oldCDSsub2 = this.cDSsub2;
        this.cDSsub2 = cDSsub2;
        changeSupport.firePropertyChange("CDSsub2", oldCDSsub2, cDSsub2);
    }

    public String getCDSsub3() {
        return cDSsub3;
    }

    public void setCDSsub3(String cDSsub3) {
        String oldCDSsub3 = this.cDSsub3;
        this.cDSsub3 = cDSsub3;
        changeSupport.firePropertyChange("CDSsub3", oldCDSsub3, cDSsub3);
    }

    public String getCDSsub4() {
        return cDSsub4;
    }

    public void setCDSsub4(String cDSsub4) {
        String oldCDSsub4 = this.cDSsub4;
        this.cDSsub4 = cDSsub4;
        changeSupport.firePropertyChange("CDSsub4", oldCDSsub4, cDSsub4);
    }

    public String getCDSarea() {
        return cDSarea;
    }

    public void setCDSarea(String cDSarea) {
        String oldCDSarea = this.cDSarea;
        this.cDSarea = cDSarea;
        changeSupport.firePropertyChange("CDSarea", oldCDSarea, cDSarea);
    }

    public String getCDSSide() {
        return cDSSide;
    }

    public void setCDSSide(String cDSSide) {
        String oldCDSSide = this.cDSSide;
        this.cDSSide = cDSSide;
        changeSupport.firePropertyChange("CDSSide", oldCDSSide, cDSSide);
    }

    public String getIssue() {
        return issue;
    }

    public void setIssue(String issue) {
        String oldIssue = this.issue;
        this.issue = issue;
        changeSupport.firePropertyChange("issue", oldIssue, issue);
    }

    public String getNotes() {
        return notes;
    }

    public void setNotes(String notes) {
        String oldNotes = this.notes;
        this.notes = notes;
        changeSupport.firePropertyChange("notes", oldNotes, notes);
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (entityID != null ? entityID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Medical)) {
            return false;
        }
        Medical other = (Medical) object;
        if ((this.entityID == null && other.entityID != null) || (this.entityID != null && !this.entityID.equals(other.entityID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.mcet.Medical[ entityID=" + entityID + " ]";
    }

    public void addPropertyChangeListener(PropertyChangeListener listener) {
        changeSupport.addPropertyChangeListener(listener);
    }

    public void removePropertyChangeListener(PropertyChangeListener listener) {
        changeSupport.removePropertyChangeListener(listener);
    }
    
}
